home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Views / Standard Views / GrayWhiteView.cp next >
Text File  |  1997-06-28  |  692b  |  41 lines

  1. // GrayWhiteView.cp
  2.  
  3. #ifndef GrayWhiteView_h
  4. #include "GrayWhiteView.h"
  5. #endif
  6. #ifndef ViewMap_h
  7. #include "ViewMap.h"
  8. #endif
  9. #ifndef WindowFocus_h
  10. #include "WindowFocus.h"
  11. #endif
  12. #ifndef BackgroundColorMaintainer_h
  13. #include "BackgroundColorMaintainer.h"
  14. #endif
  15. #ifndef NamedColors_h
  16. #include "NamedColors.h"
  17. #endif
  18.  
  19. GrayWhiteView::GrayWhiteView( WindowFocus& focus )
  20.   : Activator( focus )
  21.   {
  22.   }
  23.  
  24. void GrayWhiteView::Activate()
  25.   {
  26.     Redraw();
  27.   }
  28.  
  29. void GrayWhiteView::Deactivate()
  30.   {
  31.     Redraw();
  32.   }
  33.  
  34. void GrayWhiteView::Draw( const ViewMap& map ) const
  35.   {
  36.     BackgroundColorMaintainer cm( Active()
  37.                                                 ? NamedColors::appleGray1
  38.                                                 : NamedColors::white );
  39.     map.Erase();
  40.   }
  41.